#define _CRT_SECURE_NO_WARNINGS 1



#include<stdio.h>


int main()
{
	int t = 0;
	scanf("%d", &t);
	while (t--)
	{
		int n = 0, i = 0, a = 0, b = 0, j = 0;
		scanf("%d", &n);
		while (n--)
		{
			scanf("%d %d", &a, &b);
			for (i = 0; i < b; i++)
			{
				printf(">+");
				for (j = 0; j < a - 2; j++)
					printf("-");
				printf("+>\n");
			}
			printf("\n");
		}
	}

	return 0;
}